<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2022/3/2
  Time: 15:50
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>后台登录</title>
    <!--导入boostrap的css文件-->
    <link href="${pageContext.request.contextPath}/css/bootstrap.min.css" rel="stylesheet" >
    <!--导入jquery文件-->
    <script src="${pageContext.request.contextPath}/js/jquery-3.4.1.min.js"></script>
    <!--导入boostrap的js库-->
    <script src="${pageContext.request.contextPath}/js/bootstrap.min.js"></script>
    <!--
        class = "form-horizontal" 指定水平排列的表单

        class="form-group"  将我们的input标签,select标签 和label包裹起来,形成一行的组件

        class="form-control" :默认设置宽度属性为 width: 100%
    -->
    <style>
        #myLogin{
            border: 1px solid #000;
            width: 440px;
            height: 300px;
            margin-left: 400px;
            margin-top: 140px;
        }
        #userDiv{
            margin-top: 30px;
            margin-right: 10px;

        }
        #pwdDiv{
            margin-top: 30px;
            margin-right: 10px;
        }
    </style>
</head>
<body>
<div id="myLogin">
    <form class="form-horizontal" action="${pageContext.request.contextPath}/admin_login" method="post">
        <div class="form-group" id="userDiv">
            <label for="username" class="col-sm-2 control-label">用户名</label>
            <div class="col-sm-10">
                <%--name属性的属性值 需要和当前实体类的属性名称一致--%>
                <input type="text" class="form-control" name="name" id="username" placeholder="请您输入用户名">
            </div>
        </div>
        <div class="form-group" id="pwdDiv">
            <label for="password" class="col-sm-2 control-label">密码</label>
            <div class="col-sm-10">
                <input type="password" class="form-control" name="password" id="password" placeholder="请输入密码">
            </div>
        </div>
        <div class="form-group" style="margin-left: 30px">
            <div class="col-sm-offset-2 col-sm-10">
                <div class="checkbox">
                    <label>
                        <input type="checkbox"> 记住我
                    </label>
                </div>
            </div>
        </div>
        <div class="form-group" style="margin-left: 30px">
            <div class="col-sm-offset-2 col-sm-10">
                <button type="submit" class="btn btn-primary">登录</button>
            </div>
            <span style="color: red;font-size: 20px;"><strong>${msg}</strong>   </span>
        </div>
    </form>
</div>

</body>
</html>